

#2.Gap Detector
--------------------------------------
#2.1.Benjamin Fleming's Approach.
--------------------------------
Benjamin Fleming uses a Voltage Divider to reduce the Gap voltage.
R7-68K and R8-5.1K divide the Gap Voltage to 5.1/68=7.5%
This leads to an RC network, which funtions as a Peak Detector.
"This voltage is stored in C9-47pf capacitor."
"Diode D6-1N914-signal diode, capacitor C9, and the resistor R22-1M form something of a peak detector circuit."
"The signal from this peak detector is fed to pins 9&10 of the comparator chip LM339via R24-10K.
Reading the book, looking at the schematic; we watched three variations on the theme:
-the schematic on page 4-1 shows C9-47pF and R22-1Mohm.
-the schematic on page 4-3 shows C9-0.01uF and R22-1Mohm.
-the schematic on the pdf we got C9-47pf and R22 is gone.


conversion-calculator-time-constant
calculator-period
C9-47pf and R22-1M give a time constant of 0.05mS or 20kHz.
C9-0.01uF and R22-1Mohm give a time constant of 10mS or 100Hz.
without a resistor there is no time constant anymore.
Conclusion of story:
we donot believe anymore in the the "PEAK DETECTOR-these".
BF is looking for a representive value about the gap voltage he can use in his opamp to compare.
The evolution from 0.01uF to 47pF and at last without resistor, shows there is something else than a peak detector going on.
#2.2.Mike Bax's Approach.
--------------------------------
On http://www.mechatronicprojects.com/arc-control/ one can read:
Arc Control
The arc controller is a microcontroller controlled device that measures the arc current (galvanically isolated) and provides
the fiber optic signals to drive the IGBT power stage.
It enables setting of the key arc parameters.
Frequency (10-100KHz), duty-cycle (0-100%) and current (0-50A).
Conclusion of story:
Does not tell a lot, but the 50A are definitely overkill, considerening that only 25Watt is necessary to burn though a brass wire of 0.25mm.
#2.3.Patent US4559432 - Wire EDM for detecting discharge concentrations.
-----------------------------------------------------------------------------
On http://www.google.ch/patents/US4559432 one finds this Mutsibihi patent of 1985:
"Patent US4559432 - Wire EDM for detecting discharge concentrations using inductance".
They claim the inductance of the wire is measure of the condition of the gap.
The Download can be found here.
#2.4.Poco Supplier of Graphite gives away an insight in it's EDM Technical Manual.
------------------------------------------------------------------------------------------------------
On http://edmtechman.com/about.cfm?pg=2&chap=3 one finds this Poce Manual:
The Download can be found here.
#2.5.A study with GF participating.
---------------------------------------------------
The Study can be found here.
#2.6.The Op-amp Comparator Approach.
---------------------------------------------------------------------
In principle the are only four conditions, with induvidual delay times, to detect:
1)the circuit is open (max. voltage):the motor can advance at G00.
2)the circuit has a normal spark (reduced voltage):the motor advances pid controlled.
3)the circuit is discharging (reduced voltage):the motor is on hold.
4)the circuit is shorted (minimum voltage):shit stuff happens.
It may well be that the boundry between 2) and 3) is problematic because the narrower these voltages are to one another,
the more difficult it will become to set them properly.
We realise we are going to experiment with different -frequencies-voltages-wave forms-duty factors.
Perhaps a "lame PID" setup will do a better job, and make from setting 2) & 3) one setting; resulting in only three settings going to LinuxCNC.
A window comparator opamp is the solution.(Comparator Voltage Level Detector)

The LM339 has a voltage scope of 2-36VDC.
We'll let it work on 12VDC for the moment.
The window comparator detects DC voltages.
We expect that we have to reduce the "gap voltage" to a "mean dc voltage".
The working on the breadboard can be found HERE
Since the spark is an electromagnetic source of many wavelengths (telefunken),
direct coupling of the gap voltage to the circuit may prove a problem.
Even so, different voltages-frequencies-duty factors a.s.o. result in a different "mean voltage".
We suppose setting on one or more potentiometers will be the consequence.
#2.6.Deciding whether to use the NAND GATE LOGIC Approach or the CLASSICLADDER Approach.
-------------------------------------------------------------------------------------------------------------------
We will have to "feed" LinuxCNC with three signals for the conditions 1) & 2) & 3).
The simultaneous burning LEDs will have to replaced by one burning LED for each condition.
This can be done with SN7400 Logic or by using the Classicladder PLC logic integrated in the controller.
We managed to realise this with Classicladder inside LinuxCNC, thus minimizing the PCB and letting the computer do the work.
Inside LinuxCNC this looks as follows:

The HAL (hardware abstraction layer) file has received following modifications:
# HERE STARTS THE WISDOM ABOUT THE INPUTS AND OUTPUTS
setp parport.0.pin-05-out-invert 1
net dout-00 classicladder.0.out-00 => parport.0.pin-05-out
setp parport.0.pin-06-out-invert 1
net dout-01 classicladder.0.out-01 => parport.0.pin-06-out
setp parport.0.pin-07-out-invert 1
net dout-02 classicladder.0.out-02 => parport.0.pin-07-out
net din-00 classicladder.0.in-00 <= parport.0.pin-10-in-not
net din-01 classicladder.0.in-01 <= parport.0.pin-11-in-not
net din-02 classicladder.0.in-02 <= parport.0.pin-12-in-not
# END OF WISDOM
The Schematic is found HERE
#2.7.Adapting Classicladder to the machine.
-----------------------------------------------------------
Provisional Result:

The HAL (hardware abstraction layer) file has received following modifications:
# HERE STARTS THE WISDOM ABOUT THE INPUTS AND OUTPUTS
#PART THAT REPLACES THE SN7400 LOGIC OF THE GAP DETECTOR
net din-00 classicladder.0.in-00 <= parport.0.pin-10-in-not
net din-01 classicladder.0.in-01 <= parport.0.pin-11-in-not
net din-02 classicladder.0.in-02 <= parport.0.pin-12-in-not
#PART THAT TALKS WITH AXIS; AT THIS TIME TALKING TO THE PARPORT OUT PINS
setp parport.0.pin-05-out-invert 1
net dout-00 classicladder.0.out-00 => parport.0.pin-05-out
setp parport.0.pin-06-out-invert 1
net dout-01 classicladder.0.out-01 => motion.feed-hold
setp parport.0.pin-07-out-invert 1
net dout-02 classicladder.0.out-02 => motion.enable
# END OF WISDOM
#2.8.What we experienced of the Polish LinuxCNC DIY man:
Feed rate is set to 10 but in HAL we have configured 'stop on short circuit' - so average speed is about 3-5.
We are stopping feed.
HAL 'looks' for short circuit and then we are setting 'motion.feed-hold' to true and start timer.
Timer waits 10 seconds for movement.
If short circuit lasts for 10 seconds program stops.
THIS IS EXACTLY WHAT WE ARE DOING.